<div class="blazorise-codeblock">
<div class="csharp"><pre>
<span class="keyword">public</span> RegisterModelValidator()
{
    RuleFor(register =&gt; register.Email).EmailAddress().NotEmpty();
    RuleFor(register =&gt; register.Password).NotEmpty().Length(<span class="number">1</span>, <span class="number">24</span>);
}
</pre></div>
</div>
